import tagRender from "@/components/aggridCellRenDerer/tagRender.vue";

const tableColumns = [
    {
        headerName: '生产序号',
        field: 'serialNum',
        width: 150,
    },
    {
        headerName: '生产单号',
        field: 'weavingCode',
        width: 150,
    },
    {
        headerName: '织布单号',
        field: 'planOrderCode',
        width: 150,
    },
    {
        headerName: '客户',
        field: 'customName',
        width: 150,
    },
    {
        headerName: '机台号',
        field: 'machineCode',
        width: 150,
    },
    {
        headerName: '楼层',
        field: 'area',
        width: 150,
    },
    {
        headerName: '预计生产重量',
        field: 'alreadyWeight',
        width: 150,
    },
    {
        headerName: '状态',
        field: 'productionState',
        width: 150,
        cellRenderer: tagRender,
        cellRendererParams: {
            styleClass: (params: any) => {
                return params.productionState == 0 ? 'info' : params.productionState == 1 ? 'primary' : params.productionState == 2 ? 'success' : params.productionState == 3 ? 'warning' : ''
            },
            text: (params: any) => {
                return params.productionState == 0
                    ? '等待'
                    : params.productionState == 1
                        ? '生产中'
                        : params.productionState == 2 ? '完结' : params.productionState == 3 ? '暂停' : ''
            },
            eltagSize: 0,
        },
    },
]

export default tableColumns